package cn.zb.zbrhback.org.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "部门实体类",description = "部门的所有字段")
public class Department {
    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "部门名")
    private String name;
    @ApiModelProperty(value = "部门描述")
    private String intro;
    @JsonFormat( pattern = "YYYY-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @JsonFormat( pattern = "YYYY-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
    @ApiModelProperty(value = "员工")
    private Employee manager;
    @ApiModelProperty(value = "上级")
    private Department parent;
    @ApiModelProperty(value = "上级id")
    private Long parent_id;
    @ApiModelProperty(value = "路径")
    private String path;
    @ApiModelProperty(value = "状态")
    private Integer state;
    @ApiModelProperty(value = "该部门下所有子部门")
    private List<Department> children;

}
